using NUnit.Framework;
using PropertyExpression.Common;
using PropertyExpression.ControllableQuery;
using PropertyExpression.ControllableQuery.Test.Queries;

namespace PropertyExpression.ControllableQueryTool.Test
{
    [TestFixture]
    public class MainTest2
    {
        [Test]
        public void ModelPublicationSearchQuery()
        {
            QueryChecker.CheckQueries(
                queryContext => new ModelPublicationSearchQuery(
                                    queryContext.CreateStringParam().AsOptionalValue(),
                                    OptionalValue.Nothing<IParam<string>>(),
                                    OptionalValue.Nothing<IParam<string>>()
                                    ),
                queryContext => new ModelPublicationSearchQuery(
                                    queryContext.CreateStringParam().AsOptionalValue(),
                                    queryContext.CreateStringParam().AsOptionalValue(),
                                    queryContext.CreateStringParam().AsOptionalValue()
                                    ),
                queryContext => new ModelPublicationSearchQuery(
                                    OptionalValue.Nothing<IParam<string>>(),
                                    OptionalValue.Nothing<IParam<string>>(),
                                    OptionalValue.Nothing<IParam<string>>()
                                    )
                );
        }

        [Test]
        public void PartLinkQuery()
        {
            QueryChecker.CheckQueries(
                queryContext => new PartLinkQuery(
                                    queryContext.CreateGuidParam(),
                                    queryContext.CreateGuidParam(),
                                    queryContext.CreateGuidParam(),
                                    new WithoutInnerPartLinkSwitcher()
                                    )
                );
        }

    }
}